package ebcs.scan.service.sys.timerTask.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ebcs.database.bean.sys.PaTimerTask;
import ebcs.database.service.sys.ITimerManagerService;
import ebcs.scan.service.sys.timerTask.ITimerService;
import jplat.tools.coder.JsonCoder;
import jplat.tools.string.DateUtil;

@Service("timerService")
@Transactional
public class TimerService implements ITimerService{
	private Logger logger = Logger.getLogger(TimerService.class);

	@Autowired
	private ITimerManagerService timerService;
 

	public void doTaskServiceSomething() {
 		logger.info("timer do something"+DateUtil.getTime());
 		List<PaTimerTask> timerList = this.timerService.searchAllTimerList();
 		logger.info(JsonCoder.toJsonString(timerList));
 	}
 
}
